<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">

    <link rel="stylesheet" href="{{url_for('static', filename='bootstrap.min.css')}}">
    <link rel="stylesheet" href="{{url_for('static', filename='Message_Broad.css')}}">
    <link rel="stylesheet" href="{{url_for('static', filename='editormd.min.css')}}">

    <script src="{{url_for('static', filename='bootstrap.min.js')}}"></script>
    <script src="{{url_for('static', filename='jquery.min.js')}}"></script>
    <script src="{{url_for('static', filename='popper.min.js')}}"></script>

    <title>Message Broad</title>
</head>

<body>
    <!--head-->
    <div class="container">
        <div class="row">
            <div class="col">
                <div class="head-logo">
                    <h1>
                        <a class="text-dark" href="#">
                            Message Broad
                        </a>
                    </h1>
                    <p>Note your life!</p>
                </div>
            </div>
        </div>
    </div>

    <!--menu-->
    <div class="container bg-dark">
        <div class="row">
            <div class="col">
                <nav class="navbar navbar-expand-lg navbar-ligh">
                    <ul class="navbar-nav nav-pills mr-auto">
                        <li class="nav-item">
                            <a class="nav-link font-weight-normal active" href="/">
                                Home Page
                            </a>
                        </li>

                        <li class="nav-item">
                            <a class="nav-link font-weight-normal" href="/">
                                Home Page
                            </a>
                        </li>
                    </ul>


                    {% if current_user.is_authenticated %}
                    <ul class="navbar-nav">
                        <li class="nav-item">
                            <a class="nav-link font-weight-normal" href="{{url_for('passagesview.create_passage')}}">
                                Star a new writing here!
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link font-weight-normal"
                                href="{{url_for('userview.user', username=current_user.user_name)}}">
                                Hi! {{current_user.user_name}}
                            </a>
                        </li>
                        <li class="nav-item">
                            <a class="nav-link font-weight-normal" href="{{url_for('loginview.logout')}}">
                                注销
                            </a>
                        </li>
                    </ul>
                    {% else %}
                    <ul class="navbar-nav">
                        <li class="nav-item">
                            <a class="nav-link font-weight-normal" href="{{url_for('loginview.login')}}">
                                登录
                            </a>
                        </li>

                        <li class="nav-item">
                            <a class="nav-link font-weight-normal" href="{{url_for('loginview.register')}}">
                                注册
                            </a>
                        </li>
                    </ul>
                    {% endif %}
                </nav>

            </div>

        </div>
    </div>


    <div class="container">
        <div class="row">
            <div class="col">
                <div class="row">

                    <!--show message-->
                    <div class="mainmessage">
                        <div class="title">
                            <div class="title_main">
                                <span>here is the title</span>
                            </div>

                            <div class="message">
                            </div>
                            <!--the button-->
                            <div id="neon-btn">
                                <button class="btn one">submit article</button>
                            </div>
                        </div>
                    </div>

                </div>

                <div class="row">
                    <div id="test-editormd" class="editormd">
                        <textarea>### 关于 Editor.md</textarea>
                    </div>

                    <script src="{{url_for('static', filename='editormd.min.js')}}"></script>
                    <script type="text/javascript">
                        var testEditor;
                        testEditor = editormd("test-editormd", {
                            placeholder: '本编辑器支持Markdown编辑，左边编写，右边预览', //默认显示的文字，这里就不解释了
                            width: "90%",
                            height: 640,
                            syncScrolling: "single",
                            path: "{{url_for('static', filename='editor.md-master/lib/')}}",
                            theme: "light", //工具栏主题
                            previewTheme: "light", //预览主题
                            editorTheme: "paraiso-light", //编辑主题
                            saveHTMLToTextarea: true,
                            emoji: false,
                            taskList: true,
                            tocm: true, // Using [TOCM]
                            tex: true, // 开启科学公式TeX语言支持，默认关闭
                            flowChart: true, // 开启流程图支持，默认关闭
                            sequenceDiagram: true, // 开启时序/序列图支持，默认关闭,
                            toolbarIcons: function () { //自定义工具栏，后面有详细介绍
                                return editormd.toolbarModes['simple']; // full, simple, mini
                            }
                        });
                    </script>


                </div>

            </div>
        </div>
    </div>

</body>

</html>